// globalApi.js
const request = require('./config/request')
const {
  BASEAPIAIIIIN,
  GPTSHIXIANJIA
} = require('./config/config')

module.exports = {

  //获取风格列表
  getAiStyleTree(data) {
    let url = BASEAPIAIIIIN + '/app/aifunction/getaistyletree'
    return request.post({
      url,
      data
    })
  },
  // 获取出图消耗算力值
  getExpendIntegralApi(data) {
    let url = BASEAPIAIIIIN + '/app/aifunction/gettelepathyconfig'
    return request.post({
      url,
      data
    })
  },

  //描述词随机
  getrandomfeaturedWords(data) {
    let url = BASEAPIAIIIIN + '/app/aifunction/getrandomfeaturedwords'
    return request.post({
      url,
      data
    })
  },
  //随机风格
  getRandomaiStyle(data) {
    let url = BASEAPIAIIIIN + '/app/aifunction/getrandomaistyle'
    return request.post({
      url,
      data
    })
  },
  //创建会话id
  creatingASession(data) {
    let url = GPTSHIXIANJIA + '/api/app/create-image/get-msg'
    return request.post({
      url,
      data
    })
  },
  //生图
  creatingImg(data) {
    let url = GPTSHIXIANJIA + '/api/app/create-image/image'
    return request.post({
      url,
      data
    })
  },
  //创作历史
  creationiHstory(data) {
    let url = GPTSHIXIANJIA + '/api/app/mycreation/get-my-creation-page-with-date-list'
    return request.post({
      url,
      data
    })
  },
  //历史记录中查看正在创作的图片
  getTheDrawingIsNotComplete(data) {
    let url = GPTSHIXIANJIA + '/api/app/ai-picture-record/get-query-ai-picture-record'
    return request.post({
      url,
      data
    })
  },
  //获取阿里上传凭证
  getSts(data) {
    let url = GPTSHIXIANJIA + '/api/app/user-image-data-set/get-image-auth-token'
    return request.post({
      url,
      data
    })
  },
  //oss操作图片
  ossOperationPicture(data) {
    let url = GPTSHIXIANJIA + '/api/app/process-oss-image/dealing-with-oss-file'
    return request.post({
      url,
      data
    })
  },
  getusergeneratestatusasync(data = {}) {
    let url = BASEAPIAIIIIN + '/app/accountauth/getusergeneratestatusasync'
    return request.post({
      url,
      data
    })
  },
  // 生图问题反馈
  feedback(data) {
    let url = BASEAPIAIIIIN + '/app/feedbackauth/addbygenerateimage'
    return request.post({
      url,
      data
    })
  },
  // 退出生图排队
  dequeue(data) {
    let url = GPTSHIXIANJIA + '/api/app/create-image/cancel-queue'
    return request.post({
      url,
      data
    })
  }

}